class CreateTaggings < ActiveRecord::Migration
  def self.up
    create_table :taggings do |t|
      t.references   :tag
      t.references   :taggable, :polymorphic => true
    end
    
    add_index :taggings, :tag_id
    add_index :taggings, [:taggable_type, :taggable_id]
  end

  def self.down
    drop_table :taggings
  end
end
